// Copyright (C) joyinter
// All rights reserved.
// 
// Author : Jiang Li
// Date   : 2004-5-24

#ifndef __JOYPROGRESSBAR_H_JOY_UPDATE__
#define __JOYPROGRESSBAR_H_JOY_UPDATE__

#pragma once

#include <common/ui/imagectrl.h>


//##ModelId=44C4B60203DA
class CJoyProgressBar :
    public CJoyCtrl
{
protected:
	//##ModelId=44C4B6030002
    CJoyImagePtr    m_image;
	//##ModelId=44C4B6030006
    UINT    m_progress;
	//##ModelId=44C4B603000F
    UINT    m_side;
	//##ModelId=44C4B6030010
    UINT    m_progressStart;
	//##ModelId=44C4B6030011
    UINT    m_progressEnd;
	//##ModelId=44C4B603001F
    bool    m_startDrawn;
	//##ModelId=44C4B6030020
    bool    m_endDrawn;
	//##ModelId=44C4B6030021
    virtual void CM_LoadSkin(CJoyXmlElement* pSkinElem);
	//##ModelId=44C4B6030030
    virtual void CM_Draw(Graphics& graph);
public:
	//##ModelId=44C4B6030033
    CJoyProgressBar(void);
	//##ModelId=44C4B603003E
    virtual ~CJoyProgressBar(void);

	//##ModelId=44C4B6030041
    void Progress(UINT p);
	//##ModelId=44C4B6030043
    UINT Progress() const
    {
        return m_progress;
    }
	//##ModelId=44C4B6030045
    void SetImage(PCTSTR pszImageName);
	//##ModelId=44C4B603004E
    void Side(UINT s);
	//##ModelId=44C4B6030050
    void SetStartEnd();
	//##ModelId=44C4B6030051
    UINT Side() const
    {
        return m_side;
    }
};

#endif  // __JOYPROGRESSBAR_H_JOY_UPDATE__
